package cc.fs.myproject.NetworkRetrofit;

import java.util.List;

import retrofit.Callback;
import retrofit.RestAdapter;
import retrofit.http.GET;
import retrofit.http.Path;

/**
 * Created by fostion on 2015/7/10.
 */
public class APIClient {
    private static String API_URL = "https://api.github.com";
    interface API{
        @GET("/repos/{owner}/{repo}/contributors")
        void getWeather(@Path("owner") String owner, @Path("repo") String repo,Callback<List<GitBean>>  reponse);
    }


    public  static void creater(Callback<List<GitBean>>  callback){
        //建立对象调用
        RestAdapter restAdapter = new RestAdapter.Builder().setEndpoint(API_URL).build();
        API api = restAdapter.create(API.class);
        api.getWeather("square", "retrofit",callback);
    }

}
